package com.xbs.controller.user;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xbs.controller.base.BaseServlet;
@WebServlet("/yzm")
public class YZMServlet extends BaseServlet {
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		//生成随机四位验证码
		int num = (int) Math.floor(Math.random()*9000+1000);
		PrintWriter out = resp.getWriter();
		out.print(num);
	}
}
